<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>模板语法学习</h1>
<div>{{n1}}</div>
<div>{{n2}}</div>
<div>{{n2.0}}</div>
<div>{{n2.1}}</div>
<div>{{n2.2}}</div>
<div>
    {% for item in n2%}
    <!--中间写循环-->
    <span>{{item }}</span>
    {% endfor %}
    <div>n3数据</div>
    <hr/>
    {{ n3 }}
    {{ n3.name }}
    {{ n3.salary }}
    {{ n3.gender }}
    {{ n3.items }}
    <ul>
        {% for key,value in n3.items %}
        <li> {{key}} -> {{value}}</li>
        {% endfor %}
    </ul>
    <div>n4数据</div>
    <hr>
    {{ n4 }}
    {{ n4.0 }}
    {{ n4.1 }}
    {% for dirs in n4 %}
    <ul>
        {% for key,data in dirs.items %}
            <li>{{key}}-->{{data}}</li>
        {% endfor %}
    </ul>
    {% endfor %}
</div>
<hr>
{% if n1 == "WangXin" %}
    <h2>666666</h2>
{% elif n1 == "xxx" %}
    <h2>55555</h2>
{% else %}
    <h2>77777</h2>
{% endif %}



</body>
</html>